/**
 * admin页面用的js文件
 */
window.onload = function (){
    let $table = $("#usersTable");//用id获得这个表
    let tableData = "    <tr>\n" +
        "        <th>编号</th>\n" +
        "        <th>用户名</th>\n" +
        "        <th>密码</th>\n" +
        "        <th>邮箱</th>\n" +
        "    </tr>"
    axios({
        method:"get",
        url:""
    }).then(function (response) {
        let data = response.data();
        for (let i = 0;i < data.length ;i++){
            let item = data[i];
            tableData += "\n" +
                "    <tr>\n" +
                "        <td>" + item.id + "</td>\n" +
                "        <td>" + item.username + "</td>\n" +
                "        <td>" + item.password + "</td>\n" +
                "        <td>" + item.email + "</td>\n" +
                "    </tr>"
        }
    })
}